package com.szsfm.vehiclemanagement;

import android.app.Application;

import com.szsfm.vehiclemanagement.manager.BDLocationManager;
import com.szsfm.vehiclemanagement.manager.BuglyManager;
import com.szsfm.vehiclemanagement.manager.GreenDaoManager;
import com.szsfm.vehiclemanagement.manager.LoggerManager;
import com.szsfm.vehiclemanagement.manager.SharePrefManager;
import com.szsfm.vehiclemanagement.util.ToastUtil;

/**
 * Created by zhoubigbo on 2017/11/20.
 */
public class VMApplication extends Application {

    private static VMApplication instance = null;

    public static VMApplication getApplication(){
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        BuglyManager.getInstance().init(this);
        LoggerManager.getInstance().init();
        ToastUtil.setContext(this);
        SharePrefManager.setContext(this);
        GreenDaoManager.getInstance().init(this);
        initTerminal();
        BDLocationManager.getInstance().initSDK(this);
    }

    //初始化手持设备
    private void initTerminal() {
//        IPrinter p = new PadPrinter(this);
//        ICardOperate c = new PadCardOperate();
//        Terminal.Builder b = new Terminal.Builder().addPrinter(p).addCardOperate(c);
//        Terminal t = b.build();
//        TerminalManager.get().setTerminal(t);
    }

}
